//
// Created by whz on 2022/5/22.
//

#ifndef B_PLUS_DB_STOP_WATCH_CPP
#define B_PLUS_DB_STOP_WATCH_CPP

#include <chrono>

class StopWatch {
public:
  StopWatch();

  void start();

  void stop();

  long getElapsedTime();

  double getElapsedSeconds();

private:
  std::chrono::steady_clock::time_point startPoint;
  std::chrono::steady_clock::time_point stopPoint;
};

#endif // B_PLUS_DB_STOP_WATCH_CPP
